clear all;
clc;

phi_rot = [0,10,20,30];
dr0_val = [82,73,58,47.5];

phi = 0:30;
nocont = round(360./phi);

p = polyfit(phi_rot,dr0_val,1);
dr0_pre = polyval(p,phi);

figure;
hold on;
[haxes,h1,h2] = plotyy(phi,dr0_pre,phi,nocont);
plot(phi_rot,dr0_val,'ko','MarkerSize',10,'MarkerFaceColor','k');
hold off;
title('Angular Tripole Performance','FontSize',30);
xlabel('Clockwise Shaft Rotation (Degrees)','FontSize',30);
xlim([0,30]);
set(h1,'LineStyle','-','Color','k','LineWidth',3);
set(h2,'LineStyle','--','Color','b','LineWidth',3);
set(haxes(1),'FontSize',26,'YColor','k','YLim',[0,100],'YTick',10:10:100);
set(get(haxes(1),'Ylabel'),'String','DR_0 (%)','FontSize',30) 
set(haxes(2),'FontSize',26,'YColor','b','YLim',[0,100],'YTick',[1,10,20,50,100]);
set(get(haxes(2),'Ylabel'),'String','Number of Contacts','FontSize',30) 

